package com.xncoding.freemarker.base;
/**
 * idcoed:2025021116
 */
import jdk.nashorn.internal.objects.annotations.Getter;
//https://blog.csdn.net/xm393392625/article/details/129816563?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-1-129816563-blog-119537936.235^v39^pc_relevant_3m_sort_dl_base3&spm=1001.2101.3001.4242.1&utm_relevant_index=4
public abstract  class BaseException  extends RuntimeException {

    private BaseErrorCode error;

    private Object data ;

    public BaseException(BaseErrorCode error, Object data) {
        super(error.getValue());
        this.error = error;
        this.data=data;
    }
    protected BaseException(BaseErrorCode error, Object data, Throwable cause) {
        super(error.getValue(), cause);
        this.error = error;
        this.data=data;
    }


    public BaseErrorCode getError() {
        return error;
    }

    public void setError(BaseErrorCode error) {
        this.error = error;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
